package com.example.blog.modules.system.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.example.blog.modules.user.dto.UserDTO;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class NotificationDTO {
    private Long id;
    
    @NotBlank(message = "标题不能为空")
    @Size(max = 100, message = "标题长度不能超过100")
    private String title;
    
    @NotBlank(message = "内容不能为空")
    @Size(max = 500, message = "内容长度不能超过500")
    private String content;
    
    private UserDTO user;
    private Long userId;
    
    @NotBlank(message = "通知类型不能为空")
    private String type;
    
    private Boolean isRead;
    private String targetType;
    private Long targetId;
    
    @NotNull(message = "重要程度不能为空")
    private Integer level;
    
    private Boolean isSystem;
    
    private String recipientName;
    private Long recipientId;
    
    private String senderName;
    private Long senderId;
    
    private String link;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;
} 